/**
 * RefundRequestDao.java
 * 
 * Copyright@2015 OVT Inc. All rights reserved. 
 * 
 * 2015年12月21日
 */
package com.ovt.order.dao;

import java.util.List;

import com.ovt.order.dao.contant.OrderState;
import com.ovt.order.dao.vo.RefundReason;
import com.ovt.order.dao.vo.RefundRequest;
import com.ovt.order.service.exception.ServiceException;

/**
 * RefundRequestDao
 * 
 * @Author brad.zhou
 * @Version 1.0
 * @See
 * @Since [OVT Cloud Platform]/[API] 1.0
 */
public interface RefundRequestDao
{
    /**
     * Add a new refundRequest.
     * 
     * @param refundRequest
     * @return String
     */
    public String saveRefundRequest(RefundRequest refundRequest);

    /**
     * RefundRequestList is queried by auditor.
     * 
     * @return List<RefundRequest>
     */
    public List<RefundRequest> queryAllRefundRequestList();

    /**
     * Query refundRequest list.
     * 
     * @param requestId
     * @return RefundRequest
     */
    public List<RefundRequest> queryRefundRequestList(List<Long> requestIdList);

    /**
     * Update refundRequestList's state.
     * 
     * @param requestId
     * @param state
     * @return OrderState
     */
    public OrderState updateRefundRequestListState(List<Long> requestListId, OrderState state);
    
    /**
     * Update refundRequestList by requestId list, state and auditorId.
     * 
     * @param requestListId
     * @param state
     * @param auditorId
     * @return OrderState
     */
    public OrderState updateRefundRequestList(List<Long> requestListId,
            OrderState state, long auditorId);
    
    /**
     * Update refundRequestList by requestId list, state, feedback and auditorId.
     * 
     * @param requestListId
     * @param state
     * @param auditorId
     * @param feedback
     * @return OrderState
     */
    public OrderState updateRefundRequestList(List<Long> requestListId,
            OrderState state, long auditorId, List<String> feedback);

    /**
     * Add a new refundReason.
     * 
     * @param refundReason
     * @return void
     */
    public void saveRefundReason(RefundReason refundReason);

    /**
     * Get refundReason's list.
     * 
     * @return List<RefundReason>
     */
    public List<RefundReason> queryRefundReasonList();

    /**
     * Update refundResaon's state.
     * 
     * @param id
     * @param resaon
     * @return String
     */
    public String updateRefundReason(long id, String reason);

    /**
     * Delete a refundReason.
     * 
     * @param id
     * @return long
     */
    public void deleteRefundReason(long id);
    
    /**
     * update auditorId in refundRequestList.
     * @param requestListId
     * @param auditorId
     * @throws ServiceException
     */
    public void updateAuditorId(List<Long> requestListId, Long auditorId)
            throws ServiceException;
}
